﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="EDP.Application.Web.Function._default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body class="frame_body">
    <style type="text/css">
        .x-column-header {
            text-align: center;
        }
    </style>
    <script type="text/javascript">
        document.onkeydown = function (e) {
            if (!e) e = window.event;
            if ((e.keyCode || e.which) == 13) {
                F.f_disable('panel_grid_List_ctl00_btn_query');
                __doPostBack('panel$grid_List$ctl00$btn_query', '');
            }
        }
    </script>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager" AutoSizePanelID="panel" runat="server" />
        <f:HiddenField ID="tb_ClassifyId_edit" runat="server" />
        <f:HiddenField ID="tb_ClassifyFullCode" runat="server" />
        <f:HiddenField ID="tb_ClassifyId" runat="server" />
        <f:Panel ID="panel" runat="server" ShowBorder="false" Margin="10" Layout="Region">
            <Items>
                <f:Tree ID="tree_fun" runat="server" Title="功能分类" Margin="0" Width="260" RegionPosition="Left" OnNodeCommand="tree_fun_NodeCommand" />
                <f:Grid ID="grid_List" runat="server" Title="功能列表" Margin="0 0 0 5" RegionPosition="Center" DataKeyNames="ID" SortField="Name"
                    OnPreRowDataBound="grid_List_PreRowDataBound" OnPageIndexChange="grid_List_PageIndexChange" OnSort="grid_List_Sort" OnRowCommand="grid_List_RowCommand">
                    <Toolbars>
                        <f:Toolbar runat="server" ToolbarAlign="Right" QueryToolbar="true">
                            <Items>
                                <f:DropDownList ID="ddl_IsEnable" runat="server" QueryName="IsEnable" Label="是否启用" LabelWidth="55" Margin="0 10 0 0" Width="130">
                                    <f:ListItem Value="" Text="全部" Selected="true" />
                                    <f:ListItem Value="1" Text="是" />
                                    <f:ListItem Value="0" Text="否" />
                                </f:DropDownList>
                                <f:DropDownList ID="ddl_IsPlatform" runat="server" QueryName="IsPlatform" Label="平台功能" LabelWidth="55" Margin="0 10 0 0" Width="130">
                                    <f:ListItem Value="" Text="全部" Selected="true" />
                                    <f:ListItem Value="1" Text="是" />
                                    <f:ListItem Value="0" Text="否" />
                                </f:DropDownList>
                                <f:TextBox ID="tb1" runat="server" Margin="0" Width="240" QueryName="Name" EmptyText="功能名称" />
                                <f:Button ID="btn_query" runat="server" Text=" 查 询 " Icon="SystemSearch" Margin="0 0 0 10" OnClick="QueryClick" EnablePermission="false" />
                                <f:ToolbarFill runat="server" />
                                <f:Button ID="btn_Classify_add" runat="server" Text="新增功能分类" Icon="Add" Margin="0 10 0 0" EnablePostBack="false" />
                                <f:Button ID="btn_Classify_edit" runat="server" Text="编辑功能分类" Icon="TableEdit" Margin="0 10 0 0" Enabled="false" OnClick="btn_Classify_edit_Click" />
                                <f:Button ID="btn_Classify_delete" runat="server" Text="删除功能分类" Icon="Delete" Margin="0 10 0 0" Enabled="false"
                                    ConfirmText="是否删除所选功能分类？" ConfirmTitle="删除功能分类" ConfirmTarget="Self" ConfirmIcon="Question"
                                    OnClick="btn_Classify_delete_Click" />
                                <f:Button ID="btn_function_add" runat="server" Text="新增功能" Icon="Add" Margin="0 10 0 0" />
                                <f:Button ID="btn_more" runat="server" EnablePermission="false" Text="更多..." EnablePostBack="false">
                                    <Menu runat="server" Margin="0">
                                        <f:MenuButton ID="btn_setPermission" runat="server" Margin="0" Text="设置权限" OnClick="btn_setPermission_Click" />
                                        <f:MenuButton ID="btn_cache" runat="server" Margin="0" Text="重置缓存" ConfirmTitle="重置缓存" ConfirmText="是否重置缓存？" ConfirmTarget="Self" ConfirmIcon="Question" OnClick="btn_cache_Click" />
                                    </Menu>
                                </f:Button>
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <Columns>
                        <f:BoundField DataField="Name" Width="300" HeaderText="功能名称" />
                        <f:BoundField DataField="Content" ExpandUnusedSpace="true" HeaderText="功能地址" />
                        <f:BoundField DataField="ClassifyName" Width="150" HeaderText="功能分类" />
                        <f:BoundField DataField="CreateUserName" Width="100" HeaderText="创建人" />
                        <f:BoundField DataField="CreateTime" Width="140" HeaderText="创建时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                        <f:CheckBoxField Width="75" DataField="IsPlatform" HeaderText="平台功能" TextAlign="center" />
                        <f:CheckBoxField Width="65" DataField="IsSystem" HeaderText="系统级" TextAlign="center" />                        
                        <f:LinkButtonField ColumnID="lb_enable" Width="75" CommandName="enable" EnableLock="true" HeaderText="启用状态" CommandTitle="设置功能启用状态" ConfirmTarget="Self" ConfirmIcon="Question" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_edit" Width="30" CommandName="edit" EnableLock="true" CommandTitle="编辑功能" Icon="TableEdit" ToolTip="编辑" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_delete" Width="30" CommandName="delete" EnableLock="true" ToolTip="删除功能" CommandTitle="删除功能" Icon="Delete"
                            ConfirmTitle="删除功能" ConfirmText="是否删除该功能？" ConfirmTarget="Self" ConfirmIcon="Question" TextAlign="center" />
                    </Columns>
                </f:Grid>
            </Items>
        </f:Panel>

        <f:Window ID="win_classify" runat="server" OnClose="win_classify_Close" />
        <f:Window ID="win_function" runat="server" OnClose="win_function_Close" />
        <f:Window ID="win_permission" runat="server" Target="Top" />
    </form>
</body>
</html>
